﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Main_student.aspx.cs" Inherits="Main" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

    <script LANGUAGE="JavaScript">
            function openwin_select_course() {
                window.open('select_course.aspx', '选课', 'height=500, width=900, top=140, left=250, toolbar=no, menubar=no, scrollbars=yes, resizable=yes ,location=no, status=no') //写成一行
            }
　　</script>

    <script LANGUAGE="JavaScript">
            function openwin_search_my_course() {
                window.open('search_my_course.aspx', '查看已选课程', 'height=500, width=900, top=140, left=250, toolbar=no, menubar=no, scrollbars=yes, resizable=yes ,location=no, status=no') //写成一行
            }
　　</script>

    <script LANGUAGE="JavaScript">
        function openwin_cancel_my_course() {
            window.open('cancel_my_course.aspx', '注销我的课程', 'height=500, width=900, top=140, left=250, toolbar=no, menubar=no, scrollbars=yes, resizable=yes ,location=no, status=no') //写成一行
        }
　　</script>

    <script LANGUAGE="JavaScript">
        function openwin_search_my_score() {
            window.open('search_my_score.aspx', '查询我的成绩', 'height=500, width=900, top=140, left=250, toolbar=no, menubar=no, scrollbars=yes, resizable=yes ,location=no, status=no') //写成一行
        }
　　</script>

    <script LANGUAGE="JavaScript">
        function openwin_message_student() {
            window.open('message_student.aspx', '查询我的成绩', 'height=500, width=900, top=140, left=250, toolbar=no, menubar=no, scrollbars=yes, resizable=yes ,location=no, status=no') //写成一行
        }
　　</script>



    <title>学生选课界面</title>
    <style type="text/css">
        .auto-style1 {
            width: 1015px;
            background-color: #E6E6E6;
        }
        .auto-style3 {
            height: 200px;
        }
        .auto-style6 {
            height: 70px;
            font-size: large;
            text-align: center;
        }
        .auto-style7 {
            height: 70px;
            font-size: large;
            text-align: center;
        }
        .auto-style8 {
            font-size: large;
        }
        .auto-style9 {
            text-align: left;
        }
        .auto-style10 {
            width: 500px;
        }


    </style>
</head>
<body>
    <form id="form1" runat="server">
    <table align="center" cellpadding="0" cellspacing="0" class="auto-style1">
        <tr>
            <td class="auto-style3" colspan="3">
                <asp:Image ID="Image1" runat="server" ImageUrl="~/images/学生选课界面图片.png" />
            </td>



        </tr>
        <tr>
            <td class="auto-style7"><strong><a href="#"onclick="openwin_select_course()">选课</a></strong></td>
            <td rowspan="6" class="auto-style10">
                
                <center>
                <asp:DataList ID="DataList1" runat="server" DataKeyField="Sno" DataSourceID="SqlDataSource1" CssClass="auto-style9" CellPadding="4" ForeColor="#333333">
                    <AlternatingItemStyle BackColor="White" />
                    <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
                    <ItemStyle BackColor="#E3EAEB" />
                    <ItemTemplate>
                        <span class="auto-style8">学号: </span>
                        <asp:Label ID="SnoLabel" runat="server" Text='<%# Eval("Sno") %>' CssClass="auto-style8" />
                        <br class="auto-style8" />
                        <span class="auto-style8">姓名: </span>
                        <asp:Label ID="SnameLabel" runat="server" Text='<%# Eval("Sname") %>' CssClass="auto-style8" />
                        <br class="auto-style8" />
                        <span class="auto-style8">班级: </span>
                        <asp:Label ID="SclassLabel" runat="server" Text='<%# Eval("Sclass") %>' CssClass="auto-style8" />
                        <br class="auto-style8" />
                        <span class="auto-style8">性别: </span>
                        <asp:Label ID="SsexLabel" runat="server" Text='<%# Eval("Ssex") %>' CssClass="auto-style8" />
                        <br class="auto-style8" />
                        <span class="auto-style8">专业: </span>
                        <asp:Label ID="SmajorLabel" runat="server" Text='<%# Eval("Smajor") %>' CssClass="auto-style8" />
                        <br class="auto-style8" />
                        <span class="auto-style8">年龄: </span>
                        <asp:Label ID="SyearLabel" runat="server" Text='<%# Eval("Syear") %>' CssClass="auto-style8" />
                        <br class="auto-style8" />
                        <span class="auto-style8">是否注册: </span>
                        <asp:Label ID="flag_registerLabel" runat="server" Text='<%# Eval("flag_register") %>' CssClass="auto-style8" />
                        <br class="auto-style8" />
                        <span class="auto-style8">是否退学: </span>
                        <asp:Label ID="flag_quitLabel" runat="server" Text='<%# Eval("flag_quit") %>' CssClass="auto-style8" />
                        <br class="auto-style8" />
                        <span class="auto-style8">是否休学: </span>
                        <asp:Label ID="flag_restLabel" runat="server" Text='<%# Eval("flag_rest") %>' CssClass="auto-style8" />
                        <br />
<br />
                    </ItemTemplate>
                    <SelectedItemStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
                </asp:DataList>
                   </center>

                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:XSXKConnectionString4 %>" SelectCommand="SELECT * FROM [Student] WHERE ([Sno] = @Sno)">
                    <SelectParameters>
                        <asp:SessionParameter Name="Sno" SessionField="id" Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>

          

            <td rowspan="4">
                
                <br />
                <br />
                <br />
                <br />
                
                <asp:Image ID="Image2" runat="server" ImageUrl="~/images/学生图片.jpg" Height="135px" Width="225px" />
            </td>


  

        </tr>
        <tr>
            <td class="auto-style6"><strong><a href="#"onclick="openwin_search_my_course()">查询已选课程</a></strong></td>
        </tr>
        <tr>
            <td class="auto-style6"><a href="#"onclick="openwin_message_student()"><strong>查询我的消息</strong></a></td>
        </tr>
        <tr>
            <td class="auto-style6"><strong><a href="#"onclick="openwin_cancel_my_course()">注销课程</a></strong></td>
        </tr>
        <tr>
            <td class="auto-style6"><strong><a href="#"onclick="openwin_search_my_score()">查询成绩</a></strong></td>



  

        </tr>
        <tr>
            <td class="auto-style6"><strong><a href="login.aspx">退出</a></strong></td>
        </tr>
    </table>
    </form>
</body>
</html>
